package com.wanxi.test;

public class SumArray {
    public static void main(String[] args) {
        int[] array = {1, 2, 3, 4, 5, 6};
        int sum = 0;
        for (int i = 0; i < array.length; i++) {
            if (i % 2 == 1) {
                sum += array[i];
            }
        }
        System.out.println(sum);
    }
}
